﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace RadarMonitor.SettingPage
{
    /// <summary>
    /// Interaction logic for BaseFTPConfigWindow.xaml
    /// </summary>
    public partial class BaseFTPConfigWindow : Window
    {
        public FTPMonitor.FTPMonitor monitor { get; set; }
        public BaseFTPConfigWindow()
        {
            InitializeComponent();
        }

        private void Window_Closed(object sender, EventArgs e)
        {
            RadarMonitor.Setting.Setting.Save();
            try
            {
                monitor?.ChangeSettings(UriTB.Text, int.Parse(CheckIntervalTB.Text), int.Parse(alarmIntervalTB.Text));
            }
            catch (Exception)
            {}
        }
    }
}
